package com.cqqs.common.enums.error;

/**
 * 通用的错误枚举
 *
 * @author mjxie
 * @date 2022/09/21
 */
public enum CommonErrorEnum implements BusinessError {

    /**
     * 成功
     */
    SUCCESS(0, "success"),

    /**
     * 全局系统异常
     */
    SYSTEM_ERROR(500, "系统异常"),

    ;


    CommonErrorEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private int code;

    private String msg;

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

    @Override
    public String getData() {
        return null;
    }
}
